/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package BoardGame;

import MocaTree.Folder;
import MocaTree.Node;

import SDMLanguage.activities.Activity;

import SDMLanguage.patterns.ObjectVariable;
import SDMLanguage.patterns.StoryPattern;

import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Rule Builder</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link BoardGame.RuleBuilder#getLastField <em>Last Field</em>}</li>
 *   <li>{@link BoardGame.RuleBuilder#getFigureClass <em>Figure Class</em>}</li>
 *   <li>{@link BoardGame.RuleBuilder#getFieldClass <em>Field Class</em>}</li>
 * </ul>
 * </p>
 *
 * @see BoardGame.BoardGamePackage#getRuleBuilder()
 * @model
 * @generated
 */
public interface RuleBuilder extends EObject {
	/**
	 * Returns the value of the '<em><b>Last Field</b></em>' reference.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Last Field</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Last Field</em>' reference.
	 * @see #setLastField(ObjectVariable)
	 * @see BoardGame.BoardGamePackage#getRuleBuilder_LastField()
	 * @model
	 * @generated
	 */
	ObjectVariable getLastField();

	/**
	 * Sets the value of the '{@link BoardGame.RuleBuilder#getLastField <em>Last Field</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Last Field</em>' reference.
	 * @see #getLastField()
	 * @generated
	 */
	void setLastField(ObjectVariable value);

	/**
	 * Returns the value of the '<em><b>Figure Class</b></em>' reference.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Figure Class</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Figure Class</em>' reference.
	 * @see #setFigureClass(EClass)
	 * @see BoardGame.BoardGamePackage#getRuleBuilder_FigureClass()
	 * @model required="true"
	 * @generated
	 */
	EClass getFigureClass();

	/**
	 * Sets the value of the '{@link BoardGame.RuleBuilder#getFigureClass <em>Figure Class</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Figure Class</em>' reference.
	 * @see #getFigureClass()
	 * @generated
	 */
	void setFigureClass(EClass value);

	/**
	 * Returns the value of the '<em><b>Field Class</b></em>' reference.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Field Class</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Field Class</em>' reference.
	 * @see #setFieldClass(EClass)
	 * @see BoardGame.BoardGamePackage#getRuleBuilder_FieldClass()
	 * @model required="true"
	 * @generated
	 */
	EClass getFieldClass();

	/**
	 * Sets the value of the '{@link BoardGame.RuleBuilder#getFieldClass <em>Field Class</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Field Class</em>' reference.
	 * @see #getFieldClass()
	 * @generated
	 */
	void setFieldClass(EClass value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="SDM XMI='<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFolder\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformFolder (folder: Folder, boardGamePackage: EPackage): EPackage\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.2 \" incoming=\"#//@ownedActivityEdge.4 #//@ownedActivityEdge.5 \" name=\"for all files in the parsed MocaTree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"folder\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Folder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"file\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//File\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"file\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"main\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"rootNode\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"create new FigureClass with moveTo EOperation\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.9 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.8 \" name=\"boardGamePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"genricFigureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Figure&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"eClassifiers\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"eSuperTypes\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"figureClass\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.4 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.3 \" name=\"concreteFigureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.7\" name=\"eClassifiers\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.6 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.4 #//@ownedActivityNode.2/@storyPattern/@linkVariable.5 \" name=\"moveTo\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EOperation\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;moveTo&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"eOperations\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.8\" name=\"eModelElement\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.7 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.6 \" name=\"field\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EParameter\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" name=\"eParameters\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.7 #//@ownedActivityNode.2/@storyPattern/@linkVariable.8 #//@ownedActivityNode.2/@storyPattern/@linkVariable.9 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Field&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.5\" name=\"eType\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"eClassifiers\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fieldClass\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.3 \" name=\"rulePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.5 \" name=\"annotation\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EAnnotation\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EAnnotation/source\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;SDM&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.6\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.2 \" name=\"rulePackage\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.7\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create a new package for the rules\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" name=\"rulePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EPackage/nsPrefix\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Rules&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EPackage/nsURI\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;http://www.moflon.org/Rules&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Rules&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.4\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StatementNode\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.6 \" name=\"add SDM to the eOperation as an annotation\">\r\n    <statementExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed\">\r\n      <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed/activity\">\r\n        <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"activity\" />\r\n      </ownedParameterBindings>\r\n      <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed/activity\">\r\n        <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"annotation\" />\r\n      </ownedParameterBindings>\r\n      <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" />\r\n    </statementExpression>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.5\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.6 \" incoming=\"#//@ownedActivityEdge.3 \" name=\"process file node in the MocaTree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"activity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile/root\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"main\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.6\" />\r\n</SDMLanguage.activities:Activity>'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='boolean fujaba__Success = false;\n      EPackage rulePackage = null;\n      Iterator fujaba__IterBoardGamePackageToGenricFigureClass = null;\n      Object _TmpObject = null;\n      EClass genricFigureClass = null;\n      Iterator fujaba__IterBoardGamePackageToFieldClass = null;\n      EClass fieldClass = null;\n      EClass concreteFigureClass = null;\n      EOperation moveTo = null;\n      EParameter field = null;\n      EAnnotation annotation = null;\n      Activity activity = null;\n      Node main = null;\n      Iterator fujaba__IterFolderToFile = null;\n      File file = null;\n\n      // story pattern create a new package for the rules\n      try \n      {\n         fujaba__Success = false; \n\n         // create object rulePackage\n         rulePackage = EcoreFactory.eINSTANCE.createEPackage();\n         // assign attribute rulePackage\n         rulePackage.setNsPrefix (\"Rules\");\n         // assign attribute rulePackage\n         rulePackage.setNsURI (\"http://www.moflon.org/Rules\");\n         // assign attribute rulePackage\n         rulePackage.setName (\"Rules\");\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      // story pattern for all files in the parsed MocaTree\n      try \n      {\n         fujaba__Success = false; \n\n         // check object folder is really bound\n         JavaSDM.ensure ( folder != null );\n         // iterate to-many link file from folder to file\n         fujaba__Success = false;\n\n         fujaba__IterFolderToFile = new ArrayList(folder.getFile()).iterator ();\n\n         while ( fujaba__IterFolderToFile.hasNext () )\n         {\n            try\n            {\n               file = (File) fujaba__IterFolderToFile.next ();\n\n               // check object file is really bound\n               JavaSDM.ensure ( file != null );\n               // bind object\n               main = file.getRootNode ();\n\n               // check object main is really bound\n               JavaSDM.ensure ( main != null );\n\n               // story pattern create new FigureClass with moveTo EOperation\n               try \n               {\n                  fujaba__Success = false; \n\n                  // check object boardGamePackage is really bound\n                  JavaSDM.ensure ( boardGamePackage != null );\n                  // check object rulePackage is really bound\n                  JavaSDM.ensure ( rulePackage != null );\n                  // check isomorphic binding between objects rulePackage and boardGamePackage\n                  JavaSDM.ensure ( !rulePackage.equals (boardGamePackage) );\n\n                  // iterate to-many link eClassifiers from boardGamePackage to fieldClass\n                  fujaba__Success = false;\n\n                  fujaba__IterBoardGamePackageToFieldClass = boardGamePackage.getEClassifiers().iterator ();\n\n                  while ( !(fujaba__Success) && fujaba__IterBoardGamePackageToFieldClass.hasNext () )\n                  {\n                     try\n                     {\n                        _TmpObject =  fujaba__IterBoardGamePackageToFieldClass.next ();\n\n                        // ensure correct type and really bound of object fieldClass\n                        JavaSDM.ensure ( _TmpObject instanceof EClass );\n                        fieldClass = (EClass) _TmpObject;\n\n                        // attribute condition\n                        JavaSDM.ensure ( JavaSDM.stringCompare (fieldClass.getName (), \"Field\") == 0 );\n\n                        // iterate to-many link eClassifiers from boardGamePackage to genricFigureClass\n                        fujaba__Success = false;\n\n                        fujaba__IterBoardGamePackageToGenricFigureClass = boardGamePackage.getEClassifiers().iterator ();\n\n                        while ( !(fujaba__Success) && fujaba__IterBoardGamePackageToGenricFigureClass.hasNext () )\n                        {\n                           try\n                           {\n                              _TmpObject =  fujaba__IterBoardGamePackageToGenricFigureClass.next ();\n\n                              // ensure correct type and really bound of object genricFigureClass\n                              JavaSDM.ensure ( _TmpObject instanceof EClass );\n                              genricFigureClass = (EClass) _TmpObject;\n\n                              // check isomorphic binding between objects genricFigureClass and fieldClass\n                              JavaSDM.ensure ( !genricFigureClass.equals (fieldClass) );\n\n                              // attribute condition\n                              JavaSDM.ensure ( JavaSDM.stringCompare (genricFigureClass.getName (), \"Figure\") == 0 );\n\n\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n                        }\n                        JavaSDM.ensure (fujaba__Success);\n\n                        fujaba__Success = true;\n                     }\n                     catch ( JavaSDMException fujaba__InternalException )\n                     {\n                        fujaba__Success = false;\n                     }\n                  }\n                  JavaSDM.ensure (fujaba__Success);\n                  // create object concreteFigureClass\n                  concreteFigureClass = EcoreFactory.eINSTANCE.createEClass();\n                  // create object moveTo\n                  moveTo = EcoreFactory.eINSTANCE.createEOperation();\n                  // create object field\n                  field = EcoreFactory.eINSTANCE.createEParameter();\n                  // create object annotation\n                  annotation = EcoreFactory.eINSTANCE.createEAnnotation();\n                  // assign attribute concreteFigureClass\n                  concreteFigureClass.setName (file.getName());\n                  // assign attribute moveTo\n                  moveTo.setName (\"moveTo\");\n                  // assign attribute field\n                  field.setName (\"field\");\n                  // assign attribute annotation\n                  annotation.setSource (\"SDM\");\n                  // create link\n                  org.moflon.util.eMoflonEMFUtil.addOppositeReference(this,genricFigureClass,\"figureClass\");\n                  // create link\n                  org.moflon.util.eMoflonEMFUtil.addOppositeReference(this,fieldClass,\"fieldClass\");\n                  // create link\n                  concreteFigureClass.getESuperTypes().add(genricFigureClass);\n\n                  // create link\n                  org.moflon.util.eMoflonEMFUtil.addOppositeReference(concreteFigureClass,moveTo,\"eOperations\");\n                  // create link\n                  rulePackage.getEClassifiers().add(concreteFigureClass);\n\n                  // create link\n                  org.moflon.util.eMoflonEMFUtil.addOppositeReference(moveTo,field,\"eParameters\");\n                  // create link\n                  annotation.setEModelElement( moveTo);\n\n                  // create link\n                  org.moflon.util.eMoflonEMFUtil.addOppositeReference(field,fieldClass,\"eType\");\n                  fujaba__Success = true;\n               }\n               catch ( JavaSDMException fujaba__InternalException )\n               {\n                  fujaba__Success = false;\n               }\n\n               // story pattern process file node in the MocaTree\n               try \n               {\n                  fujaba__Success = false; \n\n                  _TmpObject = (this.transformFile(main));\n\n                  // ensure correct type and really bound of object activity\n                  JavaSDM.ensure ( _TmpObject instanceof Activity );\n                  activity = (Activity) _TmpObject;\n\n                  fujaba__Success = true;\n               }\n               catch ( JavaSDMException fujaba__InternalException )\n               {\n                  fujaba__Success = false;\n               }\n\n               this.embed(activity,annotation);\n\n\n               fujaba__Success = true;\n            }\n            catch ( JavaSDMException fujaba__InternalException )\n            {\n               fujaba__Success = false;\n            }\n         }\n         JavaSDM.ensure (fujaba__Success);\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      return rulePackage;'"
	 * @generated
	 */
	EPackage transformFolder(Folder folder, EPackage boardGamePackage);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="SDM XMI='<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformFile (root: Node): Activity\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create basic initial control flow, i.e., a new activity with a start and stop node\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 #//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"newActvity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"owningActivity\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 #//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"start\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StartNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" name=\"stop\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StopNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"ownedActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.3 #//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"initialEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.5 \" name=\"for all rules\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"root\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"rule\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;RULE&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"add new activity node for the rule; the activity node is added between the start and the second node;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.3 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 #//@ownedActivityNode.3/@storyPattern/@linkVariable.1 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" name=\"newActvity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.7\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" name=\"owningActivity\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.8 #//@ownedActivityNode.3/@storyPattern/@linkVariable.9 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.3 #//@ownedActivityNode.3/@storyPattern/@linkVariable.4 \" name=\"newActivityNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StoryNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" name=\"ownedActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.7 \" name=\"start\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StartNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.5 #//@ownedActivityNode.3/@storyPattern/@linkVariable.6 \" name=\"firstNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.5 #//@ownedActivityNode.3/@storyPattern/@linkVariable.4 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.7 \" name=\"initialEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.6 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.8 \" name=\"newFailEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//activities/ActivityEdge/guard\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.activities.EdgeGuard.FAILURE\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.10 #//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.9 \" name=\"newSuccessEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//activities/ActivityEdge/guard\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.activities.EdgeGuard.SUCCESS\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.10 \" name=\"newStopNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StopNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.7\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" name=\"target\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.3 \" name=\"newActvity\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"create StoryPattern for new ActivityNode by processing the rule\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"newActivityNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StoryNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" name=\"storyNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule/ruleNode\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"rule\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.5\" />\r\n</SDMLanguage.activities:Activity>'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='boolean fujaba__Success = false;\n      Activity newActvity = null;\n      StopNode stop = null;\n      ActivityEdge initialEdge = null;\n      StartNode start = null;\n      ActivityNode firstNode = null;\n      StoryNode newActivityNode = null;\n      StopNode newStopNode = null;\n      ActivityEdge newSuccessEdge = null;\n      ActivityEdge newFailEdge = null;\n      Object _TmpObject = null;\n      StoryPattern pattern = null;\n      Iterator fujaba__IterRootToRule = null;\n      Node rule = null;\n\n      // story pattern create basic initial control flow, i.e., a new activity with a start and stop node\n      try \n      {\n         fujaba__Success = false; \n\n         // create object newActvity\n         newActvity = ActivitiesFactory.eINSTANCE.createActivity();\n         // create object stop\n         stop = ActivitiesFactory.eINSTANCE.createStopNode();\n         // create object initialEdge\n         initialEdge = ActivitiesFactory.eINSTANCE.createActivityEdge();\n         // create object start\n         start = ActivitiesFactory.eINSTANCE.createStartNode();\n         // create link\n         stop.setOwningActivity( newActvity);\n\n         // create link\n         initialEdge.setOwningActivity( newActvity);\n\n         // create link\n         start.setOwningActivity( newActvity);\n\n         // create link\n         initialEdge.setSource( start);\n\n         // create link\n         initialEdge.setTarget( stop);\n\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      // story pattern for all rules\n      try \n      {\n         fujaba__Success = false; \n\n         // check object root is really bound\n         JavaSDM.ensure ( root != null );\n         // iterate to-many link children from root to rule\n         fujaba__Success = false;\n\n         fujaba__IterRootToRule = new ArrayList(root.getChildren()).iterator ();\n\n         while ( fujaba__IterRootToRule.hasNext () )\n         {\n            try\n            {\n               _TmpObject =  fujaba__IterRootToRule.next ();\n\n               // ensure correct type and really bound of object rule\n               JavaSDM.ensure ( _TmpObject instanceof Node );\n               rule = (Node) _TmpObject;\n\n               // check isomorphic binding between objects rule and root\n               JavaSDM.ensure ( !rule.equals (root) );\n\n               // attribute condition\n               JavaSDM.ensure ( JavaSDM.stringCompare (rule.getName (), \"RULE\") == 0 );\n\n               // story pattern add new activity node for the rule; the activity node is added between the start and the second node;\n               try \n               {\n                  fujaba__Success = false; \n\n                  // check object initialEdge is really bound\n                  JavaSDM.ensure ( initialEdge != null );\n                  // check object newActvity is really bound\n                  JavaSDM.ensure ( newActvity != null );\n                  // check object start is really bound\n                  JavaSDM.ensure ( start != null );\n                  // check link source from initialEdge to start\n                  JavaSDM.ensure (start.equals (initialEdge.getSource ()));\n\n                  // bind object\n                  firstNode = initialEdge.getTarget ();\n\n                  // check object firstNode is really bound\n                  JavaSDM.ensure ( firstNode != null );\n\n                  // check isomorphic binding between objects start and firstNode\n                  JavaSDM.ensure ( !start.equals (firstNode) );\n\n\n                  // destroy link\n                  initialEdge.setTarget(null);\n                  // create object newActivityNode\n                  newActivityNode = ActivitiesFactory.eINSTANCE.createStoryNode();\n                  // create object newStopNode\n                  newStopNode = ActivitiesFactory.eINSTANCE.createStopNode();\n                  // create object newSuccessEdge\n                  newSuccessEdge = ActivitiesFactory.eINSTANCE.createActivityEdge();\n                  // create object newFailEdge\n                  newFailEdge = ActivitiesFactory.eINSTANCE.createActivityEdge();\n                  // assign attribute newFailEdge\n                  newFailEdge.setGuard (SDMLanguage.activities.EdgeGuard.FAILURE);\n                  // assign attribute newSuccessEdge\n                  newSuccessEdge.setGuard (SDMLanguage.activities.EdgeGuard.SUCCESS);\n                  // create link\n                  newActivityNode.setOwningActivity( newActvity);\n\n                  // create link\n                  newStopNode.setOwningActivity( newActvity);\n\n                  // create link\n                  newSuccessEdge.setOwningActivity( newActvity);\n\n                  // create link\n                  newFailEdge.setOwningActivity( newActvity);\n\n                  // create link\n                  initialEdge.setTarget( newActivityNode);\n\n                  // create link\n                  newFailEdge.setSource( newActivityNode);\n\n                  // create link\n                  newSuccessEdge.setSource( newActivityNode);\n\n                  // create link\n                  newFailEdge.setTarget( firstNode);\n\n                  // create link\n                  newStopNode.getIncoming().add(newSuccessEdge);\n\n                  fujaba__Success = true;\n               }\n               catch ( JavaSDMException fujaba__InternalException )\n               {\n                  fujaba__Success = false;\n               }\n\n               // story pattern create StoryPattern for new ActivityNode by processing the rule\n               try \n               {\n                  fujaba__Success = false; \n\n                  _TmpObject = (this.transformRule(rule));\n\n                  // ensure correct type and really bound of object pattern\n                  JavaSDM.ensure ( _TmpObject instanceof StoryPattern );\n                  pattern = (StoryPattern) _TmpObject;\n\n                  // check object newActivityNode is really bound\n                  JavaSDM.ensure ( newActivityNode != null );\n                  // create link\n                  pattern.setStoryNode( newActivityNode);\n\n                  fujaba__Success = true;\n               }\n               catch ( JavaSDMException fujaba__InternalException )\n               {\n                  fujaba__Success = false;\n               }\n\n\n               fujaba__Success = true;\n            }\n            catch ( JavaSDMException fujaba__InternalException )\n            {\n               fujaba__Success = false;\n            }\n         }\n         JavaSDM.ensure (fujaba__Success);\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      return newActvity;'"
	 * @generated
	 */
	Activity transformFile(Node root);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='// TODO: implement this method\n// Ensure that you remove @generated or mark it @generated NOT\nthrow new UnsupportedOperationException();'"
	 * @generated
	 */
	void embed(Activity activity, EAnnotation annotation);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="SDM XMI='<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformRule (ruleNode: Node): StoryPattern\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"prepare variables for this and target field\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"thisOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;this&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CHECK_ONLY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.MANDATORY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.BOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"objectVariable\" />\r\n      <objectVariable bindingSemantics=\"OPTIONAL\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"previousFromLastRun\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"lastField\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 #//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" name=\"figureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"figureClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"fieldClass\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.5 \" name=\"for all rows\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"ruleNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"beforeNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;BEFORE&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"afterNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;AFTER&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;ROW&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.10\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.4 #//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.11 #//@ownedActivityEdge.12 \" name=\"for all remaining field nodes in the row of the before sub(Moca)tree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"currentFieldNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"GREATER\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.12\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.6 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"handle first field in a Row; i.e. match the first field of a row in subtree &quot;before&quot; and &quot;after&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.2 \" name=\"afterNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 \" name=\"firstFieldNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" name=\"firstFieldNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.2 \" name=\"rowNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;ROW&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.11\" source=\"#//@ownedActivityNode.4\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.7 \" incoming=\"#//@ownedActivityEdge.14 \" name=\"Create a new Field Object Variable and add it to the story pattern; create a like to the firstFieldOV ( the previously prcessed field in a row)\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"currentFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/pattern\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"pattern\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/thisOV\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"thisOV\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/before\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"currentFieldNode\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/after\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"currentFieldNodeAfter\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"source\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 #//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"linkToPreviousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;NeighbourEast&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" name=\"linkVariable\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.9\" source=\"#//@ownedActivityNode.5\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.8 #//@ownedActivityEdge.9 \" incoming=\"#//@ownedActivityEdge.13 \" name=\"check if last field reference of the Rule builder (stores the first field of the row previously processed) exists (if true: not the first row; if false: first row processed)\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.6/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.6/@storyPattern/@linkVariable.0 \" name=\"previousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" name=\"lastField\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.7\" source=\"#//@ownedActivityNode.6\" />\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.8\" source=\"#//@ownedActivityNode.6\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.10 \" incoming=\"#//@ownedActivityEdge.8 \" name=\"create a link to first field of the previous row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.1 #//@ownedActivityNode.7/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.0 \" name=\"linkToPreviousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;NeighbourNorth&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.3\" name=\"linkVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.1 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" name=\"source\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.2 \" name=\"previousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.8\" source=\"#//@ownedActivityNode.7\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.11 \" incoming=\"#//@ownedActivityEdge.9 #//@ownedActivityEdge.10 \" name=\"set last field reference to first field of the current row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.8/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.8/@storyPattern/@linkVariable.0 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.8/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.8/@storyPattern/@objectVariable.0\" name=\"lastField\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.8\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.12 \" incoming=\"#//@ownedActivityEdge.7 \" name=\"set firstFieldOV to currentfieldOV\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" />\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.9\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.3 \" name=\"pattern\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.13 \" incoming=\"#//@ownedActivityEdge.6 \" name=\"For every row crate the first field of the row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/pattern\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"pattern\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/thisOV\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"thisOV\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/before\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"firstFieldNode\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/after\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"firstFieldNodeAfter\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.6\" source=\"#//@ownedActivityNode.11\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.14 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"fetch the corresponding node (same index) in the after subtree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.12/@storyPattern/@linkVariable.0 \" name=\"currentFieldNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.12/@storyPattern/@linkVariable.0 \" name=\"rowNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.12\" />\r\n</SDMLanguage.activities:Activity>'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='boolean fujaba__Success = false;\n      ObjectVariable previousFromLastRun = null;\n      EClass figureClass = null;\n      EClass fieldClass = null;\n      StoryPattern pattern = null;\n      ObjectVariable thisOV = null;\n      Iterator fujaba__IterRowNodeAfterToFirstFieldNodeAfter = null;\n      Object _TmpObject = null;\n      Node firstFieldNodeAfter = null;\n      Iterator fujaba__IterAfterNodeToRowNodeAfter = null;\n      Node rowNodeAfter = null;\n      Iterator fujaba__IterRowNodeBeforeToFirstFieldNode = null;\n      Node firstFieldNode = null;\n      ObjectVariable firstFieldOV = null;\n      ObjectVariable previousOV = null;\n      LinkVariable linkToPreviousOV = null;\n      Iterator fujaba__IterRowNodeAfterToCurrentFieldNodeAfter = null;\n      Node currentFieldNodeAfter = null;\n      ObjectVariable currentFieldOV = null;\n      Iterator fujaba__IterRowNodeBeforeToCurrentFieldNode = null;\n      Node currentFieldNode = null;\n      Iterator fujaba__IterBeforeNodeToRowNodeBefore = null;\n      Node rowNodeBefore = null;\n      Iterator fujaba__IterRuleNodeToBeforeNode = null;\n      Node beforeNode = null;\n      Iterator fujaba__IterRuleNodeToAfterNode = null;\n      Node afterNode = null;\n\n      // story pattern prepare variables for this and target field\n      try \n      {\n         fujaba__Success = false; \n\n         // bind object\n         previousFromLastRun = this.getLastField ();\n\n\n\n         // bind object\n         fieldClass = this.getFieldClass ();\n\n         // check object fieldClass is really bound\n         JavaSDM.ensure ( fieldClass != null );\n\n         // bind object\n         figureClass = this.getFigureClass ();\n\n         // check object figureClass is really bound\n         JavaSDM.ensure ( figureClass != null );\n\n         // check isomorphic binding between objects figureClass and fieldClass\n         JavaSDM.ensure ( !figureClass.equals (fieldClass) );\n\n\n\n         // check optional\n         if (previousFromLastRun != null)\n         {\n            // destroy link\n            this.setLastField(null);\n         }// create object pattern\n         pattern = PatternsFactory.eINSTANCE.createStoryPattern();\n         // create object thisOV\n         thisOV = PatternsFactory.eINSTANCE.createObjectVariable();\n         // assign attribute thisOV\n         thisOV.setName (\"this\");\n         // assign attribute thisOV\n         thisOV.setBindingOperator (SDMLanguage.patterns.BindingOperator.CHECK_ONLY);\n         // assign attribute thisOV\n         thisOV.setBindingSemantics (SDMLanguage.patterns.BindingSemantics.MANDATORY);\n         // assign attribute thisOV\n         thisOV.setBindingState (SDMLanguage.patterns.BindingState.BOUND);\n         // create link\n         thisOV.setPattern( pattern);\n\n         // create link\n         org.moflon.util.eMoflonEMFUtil.addOppositeReference(thisOV,figureClass,\"type\");\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      // story pattern for all rows\n      try \n      {\n         fujaba__Success = false; \n\n         // check object ruleNode is really bound\n         JavaSDM.ensure ( ruleNode != null );\n         // iterate to-many link children from ruleNode to afterNode\n         fujaba__Success = false;\n\n         fujaba__IterRuleNodeToAfterNode = new ArrayList(ruleNode.getChildren()).iterator ();\n\n         while ( fujaba__IterRuleNodeToAfterNode.hasNext () )\n         {\n            try\n            {\n               _TmpObject =  fujaba__IterRuleNodeToAfterNode.next ();\n\n               // ensure correct type and really bound of object afterNode\n               JavaSDM.ensure ( _TmpObject instanceof Node );\n               afterNode = (Node) _TmpObject;\n\n               // check isomorphic binding between objects ruleNode and afterNode\n               JavaSDM.ensure ( !ruleNode.equals (afterNode) );\n\n               // iterate to-many link children from ruleNode to beforeNode\n               fujaba__Success = false;\n\n               fujaba__IterRuleNodeToBeforeNode = new ArrayList(ruleNode.getChildren()).iterator ();\n\n               while ( fujaba__IterRuleNodeToBeforeNode.hasNext () )\n               {\n                  try\n                  {\n                     _TmpObject =  fujaba__IterRuleNodeToBeforeNode.next ();\n\n                     // ensure correct type and really bound of object beforeNode\n                     JavaSDM.ensure ( _TmpObject instanceof Node );\n                     beforeNode = (Node) _TmpObject;\n\n                     // check isomorphic binding between objects beforeNode and afterNode\n                     JavaSDM.ensure ( !beforeNode.equals (afterNode) );\n\n                     // check isomorphic binding between objects ruleNode and beforeNode\n                     JavaSDM.ensure ( !ruleNode.equals (beforeNode) );\n\n                     // iterate to-many link children from beforeNode to rowNodeBefore\n                     fujaba__Success = false;\n\n                     fujaba__IterBeforeNodeToRowNodeBefore = new ArrayList(beforeNode.getChildren()).iterator ();\n\n                     while ( fujaba__IterBeforeNodeToRowNodeBefore.hasNext () )\n                     {\n                        try\n                        {\n                           _TmpObject =  fujaba__IterBeforeNodeToRowNodeBefore.next ();\n\n                           // ensure correct type and really bound of object rowNodeBefore\n                           JavaSDM.ensure ( _TmpObject instanceof Node );\n                           rowNodeBefore = (Node) _TmpObject;\n\n                           // check isomorphic binding between objects rowNodeBefore and afterNode\n                           JavaSDM.ensure ( !rowNodeBefore.equals (afterNode) );\n\n                           // check isomorphic binding between objects rowNodeBefore and beforeNode\n                           JavaSDM.ensure ( !rowNodeBefore.equals (beforeNode) );\n\n                           // check isomorphic binding between objects ruleNode and rowNodeBefore\n                           JavaSDM.ensure ( !ruleNode.equals (rowNodeBefore) );\n\n                           // attribute condition\n                           JavaSDM.ensure ( JavaSDM.stringCompare (afterNode.getName (), \"AFTER\") == 0 );\n\n                           // attribute condition\n                           JavaSDM.ensure ( JavaSDM.stringCompare (beforeNode.getName (), \"BEFORE\") == 0 );\n\n                           // attribute condition\n                           JavaSDM.ensure ( JavaSDM.stringCompare (rowNodeBefore.getName (), \"ROW\") == 0 );\n\n                           // story pattern handle first field in a Row; i.e. match the first field of a row in subtree \"before\" and \"after\"\n                           try \n                           {\n                              fujaba__Success = false; \n\n                              // check object afterNode is really bound\n                              JavaSDM.ensure ( afterNode != null );\n                              // check object rowNodeBefore is really bound\n                              JavaSDM.ensure ( rowNodeBefore != null );\n                              // check isomorphic binding between objects rowNodeBefore and afterNode\n                              JavaSDM.ensure ( !rowNodeBefore.equals (afterNode) );\n\n                              // iterate to-many link children from rowNodeBefore to firstFieldNode\n                              fujaba__Success = false;\n\n                              fujaba__IterRowNodeBeforeToFirstFieldNode = rowNodeBefore.getChildren().iterator ();\n\n                              while ( !(fujaba__Success) && fujaba__IterRowNodeBeforeToFirstFieldNode.hasNext () )\n                              {\n                                 try\n                                 {\n                                    _TmpObject =  fujaba__IterRowNodeBeforeToFirstFieldNode.next ();\n\n                                    // ensure correct type and really bound of object firstFieldNode\n                                    JavaSDM.ensure ( _TmpObject instanceof Node );\n                                    firstFieldNode = (Node) _TmpObject;\n\n                                    // check isomorphic binding between objects firstFieldNode and afterNode\n                                    JavaSDM.ensure ( !firstFieldNode.equals (afterNode) );\n\n                                    // check isomorphic binding between objects rowNodeBefore and firstFieldNode\n                                    JavaSDM.ensure ( !rowNodeBefore.equals (firstFieldNode) );\n\n                                    // attribute condition\n                                    JavaSDM.ensure ( firstFieldNode.getIndex () == 0 );\n\n                                    // iterate to-many link children from afterNode to rowNodeAfter\n                                    fujaba__Success = false;\n\n                                    fujaba__IterAfterNodeToRowNodeAfter = afterNode.getChildren().iterator ();\n\n                                    while ( !(fujaba__Success) && fujaba__IterAfterNodeToRowNodeAfter.hasNext () )\n                                    {\n                                       try\n                                       {\n                                          _TmpObject =  fujaba__IterAfterNodeToRowNodeAfter.next ();\n\n                                          // ensure correct type and really bound of object rowNodeAfter\n                                          JavaSDM.ensure ( _TmpObject instanceof Node );\n                                          rowNodeAfter = (Node) _TmpObject;\n\n                                          // check isomorphic binding between objects rowNodeAfter and afterNode\n                                          JavaSDM.ensure ( !rowNodeAfter.equals (afterNode) );\n\n                                          // check isomorphic binding between objects rowNodeAfter and firstFieldNode\n                                          JavaSDM.ensure ( !rowNodeAfter.equals (firstFieldNode) );\n\n                                          // check isomorphic binding between objects rowNodeBefore and rowNodeAfter\n                                          JavaSDM.ensure ( !rowNodeBefore.equals (rowNodeAfter) );\n\n                                          // attribute condition\n                                          JavaSDM.ensure ( rowNodeAfter.getIndex () == rowNodeBefore.getIndex() );\n\n                                          // attribute condition\n                                          JavaSDM.ensure ( JavaSDM.stringCompare (rowNodeAfter.getName (), \"ROW\") == 0 );\n\n                                          // iterate to-many link children from rowNodeAfter to firstFieldNodeAfter\n                                          fujaba__Success = false;\n\n                                          fujaba__IterRowNodeAfterToFirstFieldNodeAfter = rowNodeAfter.getChildren().iterator ();\n\n                                          while ( !(fujaba__Success) && fujaba__IterRowNodeAfterToFirstFieldNodeAfter.hasNext () )\n                                          {\n                                             try\n                                             {\n                                                _TmpObject =  fujaba__IterRowNodeAfterToFirstFieldNodeAfter.next ();\n\n                                                // ensure correct type and really bound of object firstFieldNodeAfter\n                                                JavaSDM.ensure ( _TmpObject instanceof Node );\n                                                firstFieldNodeAfter = (Node) _TmpObject;\n\n                                                // check isomorphic binding between objects firstFieldNodeAfter and afterNode\n                                                JavaSDM.ensure ( !firstFieldNodeAfter.equals (afterNode) );\n\n                                                // check isomorphic binding between objects firstFieldNodeAfter and firstFieldNode\n                                                JavaSDM.ensure ( !firstFieldNodeAfter.equals (firstFieldNode) );\n\n                                                // check isomorphic binding between objects rowNodeAfter and firstFieldNodeAfter\n                                                JavaSDM.ensure ( !rowNodeAfter.equals (firstFieldNodeAfter) );\n\n                                                // check isomorphic binding between objects rowNodeBefore and firstFieldNodeAfter\n                                                JavaSDM.ensure ( !rowNodeBefore.equals (firstFieldNodeAfter) );\n\n                                                // attribute condition\n                                                JavaSDM.ensure ( firstFieldNodeAfter.getIndex () == 0 );\n\n\n                                                fujaba__Success = true;\n                                             }\n                                             catch ( JavaSDMException fujaba__InternalException )\n                                             {\n                                                fujaba__Success = false;\n                                             }\n                                          }\n                                          JavaSDM.ensure (fujaba__Success);\n\n                                          fujaba__Success = true;\n                                       }\n                                       catch ( JavaSDMException fujaba__InternalException )\n                                       {\n                                          fujaba__Success = false;\n                                       }\n                                    }\n                                    JavaSDM.ensure (fujaba__Success);\n\n                                    fujaba__Success = true;\n                                 }\n                                 catch ( JavaSDMException fujaba__InternalException )\n                                 {\n                                    fujaba__Success = false;\n                                 }\n                              }\n                              JavaSDM.ensure (fujaba__Success);\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n\n                           // story pattern For every row crate the first field of the row\n                           try \n                           {\n                              fujaba__Success = false; \n\n                              _TmpObject = (this.transformField(pattern,thisOV,firstFieldNode,firstFieldNodeAfter));\n\n                              // ensure correct type and really bound of object firstFieldOV\n                              JavaSDM.ensure ( _TmpObject instanceof ObjectVariable );\n                              firstFieldOV = (ObjectVariable) _TmpObject;\n\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n\n                           // story pattern check if last field reference of the Rule builder (stores the first field of the row previously processed) exists (if true: not the first row; if false: first row processed)\n                           try \n                           {\n                              fujaba__Success = false; \n\n                              // bind object\n                              previousOV = this.getLastField ();\n\n                              // check object previousOV is really bound\n                              JavaSDM.ensure ( previousOV != null );\n\n\n                              // destroy link\n                              org.moflon.util.eMoflonEMFUtil.removeOppositeReference(this,previousOV,\"lastField\");\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n\n                           if (fujaba__Success)\n                           {\n                              // story pattern create a link to first field of the previous row\n                              try \n                              {\n                                 fujaba__Success = false; \n\n                                 // check object firstFieldOV is really bound\n                                 JavaSDM.ensure ( firstFieldOV != null );\n                                 // check object pattern is really bound\n                                 JavaSDM.ensure ( pattern != null );\n                                 // check object previousOV is really bound\n                                 JavaSDM.ensure ( previousOV != null );\n                                 // check isomorphic binding between objects previousOV and firstFieldOV\n                                 JavaSDM.ensure ( !previousOV.equals (firstFieldOV) );\n\n                                 // create object linkToPreviousOV\n                                 linkToPreviousOV = PatternsFactory.eINSTANCE.createLinkVariable();\n                                 // assign attribute linkToPreviousOV\n                                 linkToPreviousOV.setName (\"NeighbourNorth\");\n                                 // create link\n                                 previousOV.getIncomingLink().add(linkToPreviousOV);\n\n                                 // create link\n                                 firstFieldOV.getOutgoingLink().add(linkToPreviousOV);\n\n                                 // create link\n                                 pattern.getLinkVariable().add(linkToPreviousOV);\n\n                                 fujaba__Success = true;\n                              }\n                              catch ( JavaSDMException fujaba__InternalException )\n                              {\n                                 fujaba__Success = false;\n                              }\n\n\n                           }\n                           else\n                           {\n\n                           }\n                           // story pattern set last field reference to first field of the current row\n                           try \n                           {\n                              fujaba__Success = false; \n\n                              // check object firstFieldOV is really bound\n                              JavaSDM.ensure ( firstFieldOV != null );\n                              // create link\n                              org.moflon.util.eMoflonEMFUtil.addOppositeReference(this,firstFieldOV,\"lastField\");\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n\n                           // story pattern for all remaining field nodes in the row of the before sub(Moca)tree\n                           try \n                           {\n                              fujaba__Success = false; \n\n                              // check object rowNodeBefore is really bound\n                              JavaSDM.ensure ( rowNodeBefore != null );\n                              // iterate to-many link children from rowNodeBefore to currentFieldNode\n                              fujaba__Success = false;\n\n                              fujaba__IterRowNodeBeforeToCurrentFieldNode = new ArrayList(rowNodeBefore.getChildren()).iterator ();\n\n                              while ( fujaba__IterRowNodeBeforeToCurrentFieldNode.hasNext () )\n                              {\n                                 try\n                                 {\n                                    _TmpObject =  fujaba__IterRowNodeBeforeToCurrentFieldNode.next ();\n\n                                    // ensure correct type and really bound of object currentFieldNode\n                                    JavaSDM.ensure ( _TmpObject instanceof Node );\n                                    currentFieldNode = (Node) _TmpObject;\n\n                                    // check isomorphic binding between objects rowNodeBefore and currentFieldNode\n                                    JavaSDM.ensure ( !rowNodeBefore.equals (currentFieldNode) );\n\n                                    // attribute condition\n                                    JavaSDM.ensure ( currentFieldNode.getIndex () > 0 );\n\n                                    // story pattern fetch the corresponding node (same index) in the after subtree\n                                    try \n                                    {\n                                       fujaba__Success = false; \n\n                                       // check object rowNodeAfter is really bound\n                                       JavaSDM.ensure ( rowNodeAfter != null );\n                                       // iterate to-many link children from rowNodeAfter to currentFieldNodeAfter\n                                       fujaba__Success = false;\n\n                                       fujaba__IterRowNodeAfterToCurrentFieldNodeAfter = rowNodeAfter.getChildren().iterator ();\n\n                                       while ( !(fujaba__Success) && fujaba__IterRowNodeAfterToCurrentFieldNodeAfter.hasNext () )\n                                       {\n                                          try\n                                          {\n                                             _TmpObject =  fujaba__IterRowNodeAfterToCurrentFieldNodeAfter.next ();\n\n                                             // ensure correct type and really bound of object currentFieldNodeAfter\n                                             JavaSDM.ensure ( _TmpObject instanceof Node );\n                                             currentFieldNodeAfter = (Node) _TmpObject;\n\n                                             // check isomorphic binding between objects rowNodeAfter and currentFieldNodeAfter\n                                             JavaSDM.ensure ( !rowNodeAfter.equals (currentFieldNodeAfter) );\n\n                                             // attribute condition\n                                             JavaSDM.ensure ( currentFieldNodeAfter.getIndex () == currentFieldNode.getIndex() );\n\n\n                                             fujaba__Success = true;\n                                          }\n                                          catch ( JavaSDMException fujaba__InternalException )\n                                          {\n                                             fujaba__Success = false;\n                                          }\n                                       }\n                                       JavaSDM.ensure (fujaba__Success);\n                                       fujaba__Success = true;\n                                    }\n                                    catch ( JavaSDMException fujaba__InternalException )\n                                    {\n                                       fujaba__Success = false;\n                                    }\n\n                                    // story pattern Create a new Field Object Variable and add it to the story pattern; create a like to the firstFieldOV ( the previously prcessed field in a row)\n                                    try \n                                    {\n                                       fujaba__Success = false; \n\n                                       _TmpObject = (this.transformField(pattern,thisOV,currentFieldNode,currentFieldNodeAfter));\n\n                                       // ensure correct type and really bound of object currentFieldOV\n                                       JavaSDM.ensure ( _TmpObject instanceof ObjectVariable );\n                                       currentFieldOV = (ObjectVariable) _TmpObject;\n\n                                       // check object firstFieldOV is really bound\n                                       JavaSDM.ensure ( firstFieldOV != null );\n                                       // check object pattern is really bound\n                                       JavaSDM.ensure ( pattern != null );\n                                       // check isomorphic binding between objects firstFieldOV and currentFieldOV\n                                       JavaSDM.ensure ( !firstFieldOV.equals (currentFieldOV) );\n\n                                       // create object linkToPreviousOV\n                                       linkToPreviousOV = PatternsFactory.eINSTANCE.createLinkVariable();\n                                       // assign attribute linkToPreviousOV\n                                       linkToPreviousOV.setName (\"NeighbourEast\");\n                                       // create link\n                                       linkToPreviousOV.setPattern( pattern);\n\n                                       // create link\n                                       linkToPreviousOV.setTarget( currentFieldOV);\n\n                                       // create link\n                                       linkToPreviousOV.setSource( firstFieldOV);\n\n                                       fujaba__Success = true;\n                                    }\n                                    catch ( JavaSDMException fujaba__InternalException )\n                                    {\n                                       fujaba__Success = false;\n                                    }\n\n                                    // story pattern set firstFieldOV to currentfieldOV\n                                    try \n                                    {\n                                       fujaba__Success = false; \n\n                                       _TmpObject = currentFieldOV;\n\n                                       // ensure correct type and really bound of object firstFieldOV\n                                       JavaSDM.ensure ( _TmpObject instanceof ObjectVariable );\n                                       firstFieldOV = (ObjectVariable) _TmpObject;\n\n                                       fujaba__Success = true;\n                                    }\n                                    catch ( JavaSDMException fujaba__InternalException )\n                                    {\n                                       fujaba__Success = false;\n                                    }\n\n\n                                    fujaba__Success = true;\n                                 }\n                                 catch ( JavaSDMException fujaba__InternalException )\n                                 {\n                                    fujaba__Success = false;\n                                 }\n                              }\n                              JavaSDM.ensure (fujaba__Success);\n                              fujaba__Success = true;\n                           }\n                           catch ( JavaSDMException fujaba__InternalException )\n                           {\n                              fujaba__Success = false;\n                           }\n\n\n                           fujaba__Success = true;\n                        }\n                        catch ( JavaSDMException fujaba__InternalException )\n                        {\n                           fujaba__Success = false;\n                        }\n                     }\n                     JavaSDM.ensure (fujaba__Success);\n\n                     fujaba__Success = true;\n                  }\n                  catch ( JavaSDMException fujaba__InternalException )\n                  {\n                     fujaba__Success = false;\n                  }\n               }\n               JavaSDM.ensure (fujaba__Success);\n\n               fujaba__Success = true;\n            }\n            catch ( JavaSDMException fujaba__InternalException )\n            {\n               fujaba__Success = false;\n            }\n         }\n         JavaSDM.ensure (fujaba__Success);\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      return pattern;'"
	 * @generated
	 */
	StoryPattern transformRule(Node ruleNode);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="SDM XMI='<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformField (pattern: StoryPattern, figureOV: ObjectVariable, before: Node, after: Node): ObjectVariable\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.2 \" incoming=\"#//@ownedActivityEdge.3 \" name=\"If before node (representing a field in the before sub(Moca)tree) is labeled with &quot;THIS_FIELD&quot; (# in textual syntax) then create link from the figure to corresponding field (indicating that figure is on the created field) and mark it as &quot;DESTROY&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"before\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;THIS_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;currentField&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"figureOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 #//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" name=\"link\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/LinkVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.DESTROY\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" name=\"outgoingLink\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" name=\"linkVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create a new Field Object Variable; set type to fieldClass; add it to the story pattern\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fieldClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;+before.getParentNode().getIndex()+before.getIndex()\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CHECK_ONLY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.MANDATORY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.UNBOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"objectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"If after node (representing a field in the after sub(Moca)tree) is labeled with &quot;THIS_FIELD&quot; then create link from the figure to corresponding field (indicating that figure has to be moved on created field) and mark it as &quot;CREATE&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.BOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"after\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;THIS_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" name=\"link\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/LinkVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CREATE\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" name=\"outgoingLink\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" name=\"figureOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"pattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.5 \" name=\"createdFieldOV\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"If before node (representing a field in the before sub(Moca)tree) is labeled with &quot;EMPTY_FIELD&quot; then create a NAC that ensures that no figure is on this field\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"before\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;EMPTY_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.3 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 #//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.5 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 #//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" name=\"noFigure\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.NEGATIVE\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;noFigure&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" name=\"objectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 #//@ownedActivityNode.5/@storyPattern/@linkVariable.3 \" name=\"ovToFigure\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;figure&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" name=\"linkVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" name=\"outgoingLink\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.4 #//@ownedActivityNode.5/@storyPattern/@linkVariable.5 \" name=\"figureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.6\" name=\"figureClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.4 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.5\" />\r\n</SDMLanguage.activities:Activity>'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='boolean fujaba__Success = false;\n      EClass fieldClass = null;\n      ObjectVariable createdFieldOV = null;\n      LinkVariable link = null;\n      EClass figureClass = null;\n      LinkVariable ovToFigure = null;\n      ObjectVariable noFigure = null;\n\n      // story pattern create a new Field Object Variable; set type to fieldClass; add it to the story pattern\n      try \n      {\n         fujaba__Success = false; \n\n         // check object pattern is really bound\n         JavaSDM.ensure ( pattern != null );\n         // bind object\n         fieldClass = this.getFieldClass ();\n\n         // check object fieldClass is really bound\n         JavaSDM.ensure ( fieldClass != null );\n\n\n         // create object createdFieldOV\n         createdFieldOV = PatternsFactory.eINSTANCE.createObjectVariable();\n         // assign attribute createdFieldOV\n         createdFieldOV.setName (\"field\"+before.getParentNode().getIndex()+before.getIndex());\n         // assign attribute createdFieldOV\n         createdFieldOV.setBindingOperator (SDMLanguage.patterns.BindingOperator.CHECK_ONLY);\n         // assign attribute createdFieldOV\n         createdFieldOV.setBindingSemantics (SDMLanguage.patterns.BindingSemantics.MANDATORY);\n         // assign attribute createdFieldOV\n         createdFieldOV.setBindingState (SDMLanguage.patterns.BindingState.UNBOUND);\n         // create link\n         createdFieldOV.setType( fieldClass);\n\n         // create link\n         pattern.getObjectVariable().add(createdFieldOV);\n\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      // story pattern If before node (representing a field in the before sub(Moca)tree) is labeled with \"THIS_FIELD\" (# in textual syntax) then create link from the figure to corresponding field (indicating that figure is on the created field) and mark it as \"DESTROY\"\n      try \n      {\n         fujaba__Success = false; \n\n         // check object before is really bound\n         JavaSDM.ensure ( before != null );\n         // check object createdFieldOV is really bound\n         JavaSDM.ensure ( createdFieldOV != null );\n         // check object figureOV is really bound\n         JavaSDM.ensure ( figureOV != null );\n         // check object pattern is really bound\n         JavaSDM.ensure ( pattern != null );\n         // check isomorphic binding between objects figureOV and createdFieldOV\n         JavaSDM.ensure ( !figureOV.equals (createdFieldOV) );\n\n         // attribute condition\n         JavaSDM.ensure ( JavaSDM.stringCompare (before.getName (), \"THIS_FIELD\") == 0 );\n\n         // create object link\n         link = PatternsFactory.eINSTANCE.createLinkVariable();\n         // assign attribute createdFieldOV\n         createdFieldOV.setName (\"currentField\");\n         // assign attribute link\n         link.setName (\"field\");\n         // assign attribute link\n         link.setBindingOperator (SDMLanguage.patterns.BindingOperator.DESTROY);\n         // create link\n         link.setTarget( createdFieldOV);\n\n         // create link\n         link.setSource( figureOV);\n\n         // create link\n         pattern.getLinkVariable().add(link);\n\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      if (fujaba__Success)\n      {\n\n      }\n      else\n      {\n         // story pattern If after node (representing a field in the after sub(Moca)tree) is labeled with \"THIS_FIELD\" then create link from the figure to corresponding field (indicating that figure has to be moved on created field) and mark it as \"CREATE\"\n         try \n         {\n            fujaba__Success = false; \n\n            // check object after is really bound\n            JavaSDM.ensure ( after != null );\n            // check object createdFieldOV is really bound\n            JavaSDM.ensure ( createdFieldOV != null );\n            // check object figureOV is really bound\n            JavaSDM.ensure ( figureOV != null );\n            // check object pattern is really bound\n            JavaSDM.ensure ( pattern != null );\n            // check isomorphic binding between objects figureOV and createdFieldOV\n            JavaSDM.ensure ( !figureOV.equals (createdFieldOV) );\n\n            // attribute condition\n            JavaSDM.ensure ( JavaSDM.stringCompare (after.getName (), \"THIS_FIELD\") == 0 );\n\n            // create object link\n            link = PatternsFactory.eINSTANCE.createLinkVariable();\n            // assign attribute createdFieldOV\n            createdFieldOV.setName (\"field\");\n            // assign attribute createdFieldOV\n            createdFieldOV.setBindingState (SDMLanguage.patterns.BindingState.BOUND);\n            // assign attribute link\n            link.setBindingOperator (SDMLanguage.patterns.BindingOperator.CREATE);\n            // assign attribute link\n            link.setName (\"field\");\n            // create link\n            link.setTarget( createdFieldOV);\n\n            // create link\n            figureOV.getOutgoingLink().add(link);\n\n            // create link\n            pattern.getLinkVariable().add(link);\n\n            fujaba__Success = true;\n         }\n         catch ( JavaSDMException fujaba__InternalException )\n         {\n            fujaba__Success = false;\n         }\n\n         // story pattern If before node (representing a field in the before sub(Moca)tree) is labeled with \"EMPTY_FIELD\" then create a NAC that ensures that no figure is on this field\n         try \n         {\n            fujaba__Success = false; \n\n            // check object before is really bound\n            JavaSDM.ensure ( before != null );\n            // check object createdFieldOV is really bound\n            JavaSDM.ensure ( createdFieldOV != null );\n            // check object pattern is really bound\n            JavaSDM.ensure ( pattern != null );\n            // bind object\n            figureClass = this.getFigureClass ();\n\n            // check object figureClass is really bound\n            JavaSDM.ensure ( figureClass != null );\n\n\n            // attribute condition\n            JavaSDM.ensure ( JavaSDM.stringCompare (before.getName (), \"EMPTY_FIELD\") == 0 );\n\n            // create object ovToFigure\n            ovToFigure = PatternsFactory.eINSTANCE.createLinkVariable();\n            // create object noFigure\n            noFigure = PatternsFactory.eINSTANCE.createObjectVariable();\n            // assign attribute noFigure\n            noFigure.setBindingSemantics (SDMLanguage.patterns.BindingSemantics.NEGATIVE);\n            // assign attribute noFigure\n            noFigure.setName (\"noFigure\");\n            // assign attribute ovToFigure\n            ovToFigure.setName (\"figure\");\n            // create link\n            ovToFigure.setSource( createdFieldOV);\n\n            // create link\n            ovToFigure.setPattern( pattern);\n\n            // create link\n            noFigure.setPattern( pattern);\n\n            // create link\n            org.moflon.util.eMoflonEMFUtil.addOppositeReference(noFigure,figureClass,\"type\");\n            // create link\n            ovToFigure.setTarget( noFigure);\n\n            fujaba__Success = true;\n         }\n         catch ( JavaSDMException fujaba__InternalException )\n         {\n            fujaba__Success = false;\n         }\n\n\n      }\n      return createdFieldOV;'"
	 * @generated
	 */
	ObjectVariable transformField(StoryPattern pattern,
			ObjectVariable figureOV, Node before, Node after);

} // RuleBuilder
